package itdep.domain.address;

import itdep.domain.NamedEntity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @author Ivan Khalopik
 * @version $Revision: 10 $ $Date: 2010-06-16 07:13:04 +0000 (Wed, 16 Jun 2010) $
 */
@Entity
@Table(name = "STREET")
public class Street extends NamedEntity {

	@ManyToOne
	@JoinColumn(name = "ID_CITY", nullable = false)
	private City city;

	@ManyToOne
	@JoinColumn(name = "ID_STREET_TYPE", nullable = false)
	private StreetType streetType;

	public City getCity() {
		return city;
	}

	public void setCity(City city) {
		this.city = city;
	}

	public StreetType getStreetType() {
		return streetType;
	}

	public void setStreetType(StreetType streetType) {
		this.streetType = streetType;
	}

}